/*
 * @Author: zhaiyujia
 * @Date: 2022-11-16 00:43:31
 * @LastEditors: zhaiyujia
 * @LastEditTime: 2022-11-24 02:38:47
 * @Description: ws2812 test.
 */

#include "Arduino.h"

#define LED_PIN D55
#define LED_REG P55
#define LED_NUM 16
#define BRIGHTNESS 255
#include "ws2812.h"
#include "color.h"
uint8_t leds[LED_NUM * 3]; // GRB

void setup()
{
    pinMode(LED_PIN, OUTPUT); // led data pin
    Serial_begin(115200);     //
    delay(1100);              // Wait for STC-ISP to open the serial port
    Serial_println("Hello Arduino-STC.");
    rainbowColor(&leds, LED_NUM);
}
void loop()
{
    led_show(&leds, LED_NUM);
    delay(1000);
}